﻿<div class="row">

    <div class="col-12 col-lg-8 mb-3" >
        <div class="h-100" style="display: flex; flex-direction: column; justify-content: space-between;">
            <MainInforCard Model="Model" />
            <div class="mt-3 h-100">
                <EditContextCard Model="Item" />
            </div>
        </div>
   
    </div>
    <div class="col-12 col-lg-4 mb-3" >
        <ListEditRecordInforCard Model="Model" OnClickEditRecord="SelecteChanged"/>
    </div>
</div>
@code {

    [Parameter]
    public ExaminesOverviewViewModel Model { get; set; }
    public EditRecordAloneViewModel Item { get; set; } = new EditRecordAloneViewModel();


    protected override void OnInitialized()
    {
        SelecteChanged(Model.Examines.FirstOrDefault(s => s.IsSelected));
    }

    public void SelecteChanged(EditRecordAloneViewModel item)
    {
        Item = item;
        StateHasChanged();
        
    }
}
